<div class="header_menu">
    <div class="container">
        <div class="header-nav clearfix">
            <?php echo $this->partial('shop/layout/headerMenu'); ?>
        </div>
    </div>
</div>
</div>

<div class="container">
    <div id="shopCartBox">
        <div class="shop-cart-box">
            <div class="shop-cart-box-bd shop-cart-goods">
                <table class="table table-bordered">
                    <tr>
                        <td>
                            <p><b><?php echo isset($this->result->pay_name) ? $this->result->pay_name : $this->translate('微信扫码充值'); ?>：</b>
                                <img alt="<?php echo $this->translate('二维码扫码充值'); ?>" src="<?php echo $this->url('shop/default', ['action' => 'shopQrCodeFile'], ['query' => ['qToken' => $this->shopHelper()->getCsrfValue(), 'data' => $this->result->code_url]]); ?>" style="width:260px;height:260px;"/>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        setInterval("ajaxRechargeStatus()", 3000);
    });
    function ajaxRechargeStatus() {
        $.ajax({
            url: "<?php echo $this->url('home-user-balance', ['action' => 'ajaxRechargePaymentStatus', 'id' => $this->userRechargeInfo->getRechargeId()]); ?>",
            type: "GET",
            dataType:"json",
            data: "",
            success: function (data) {
                if (data.state=='true') {
                    window.location.href = "<?php echo $this->url('shop-return', ['action' => 'rechargePaymentReturn', 'id' => $this->userRechargeInfo->getRechargeId()]); ?>";
                }
            }
        });
    }
</script>